package com.nsu.evaluation.service.impl;

import com.nsu.evaluation.common.ServerResponse;
import com.nsu.evaluation.dao.FeedbackReplyMapper;
import com.nsu.evaluation.pojo.FeedbackReply;
import com.nsu.evaluation.service.FeedbackReplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FeedbackReplyServiceImpl implements FeedbackReplyService {

    @Autowired
    public FeedbackReplyMapper feedbackReplyMapper;

    /**
     * 新增申诉
     * @param feedbackReply
     * @return
     */
    @Override
    public ServerResponse addFeedbackReply(FeedbackReply feedbackReply){
        int rowCount = feedbackReplyMapper.insert(feedbackReply);
        if(rowCount > 0){
            return ServerResponse.createBySuccess("新增申诉成功",feedbackReply);
        }
        return ServerResponse.createByErrorMessage("新增申诉失败");
    }
}
